#ifndef PARALLELCOMPILER_H
#define	PARALLELCOMPILER_H

#include <pthread.h>
#include "../BMC.h"
#include "../../List.h"

typedef enum PCLoopState{
    PCLS_Sleeping,
    PCLS_Compiling
} PCLoopState;

typedef struct ParallelCompilationQueue{
    pthread_mutex_t M;
    List* OrderList;
} ParallelCompilationQueue;

typedef struct ParallelCompiler{
    pthread_cond_t Cond;
    pthread_mutex_t M;
    pthread_t CompilerThreadID;
    PCLoopState CompilerState;
} ParallelCompiler;

void CQ_Init(void);

void PC_Init(uint32_t NumCompilers);
void PC_Compile(BMCList* CompilationOrder);

#endif	/* PARALLELCOMPILER_H */

